Values of cpu_weight and cpu_cap are lost after xend restart
authorLutz Dube Lutz.Dube@ts.fujitsu.com <Lutz Dube Lutz.Dube@ts.fujitsu.com>
Mon, 16 Aug 2010 16:14:10 +0000 (17:14 +0100)
committerLutz Dube Lutz.Dube@ts.fujitsu.com <Lutz Dube Lutz.Dube@ts.fujitsu.com>
Mon, 16 Aug 2010 16:14:10 +0000 (17:14 +0100)
commit1ecf910c9bdc713968d0e1515be865d31267619a
treee1848b1d3ec390e70519253585127027deace31e
parent3484b6c6c6d64846e69c13e137cd2d8065e5a58c
Values of cpu_weight and cpu_cap are lost after xend restart

For managed domains in state 'halted' I always get default values
for cpu_cap / cpu_weight after xend restart.
This is because the names of parameters differ between a SXP file to
create a VM (here the parameter names are cpu_cap / cpu_weight) and
a SXP file of a managed VM (here vcpus_params (cap 0) (weight 0)).
But XendConfig.py reads only cpu_cap / cpu_weight and if not found,
default values are used.
 
The patch reads first vcpus_params (cap, weight), if not found then cpu_cap,
cpu_weight and if both parameters are missing it uses the default values.
 
Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/python/xen/xend/XendConfig.py